import Vue from 'vue'
import VueRouter from 'vue-router'
import Register from "../views/Register";

Vue.use(VueRouter)

const routes = [
    {
        path: '/',
        name: 'Login',
        component: () => import('../views/Login'),
    },
    {
        path: '/Register',
        name: Register,
        component: () => import('../views/Register')
    },
    {
        path: '/Home',
        component: () => import('../components/Home'),
        children: [
            {
                path: '/Info',
                component: () => import('../views/Info')
            },
            {
                path: '/HotGameChina',
                component: () => import('../views/Home/HotGameChina')
            },
            {
                path: '/HotGameAGT',
                component: () => import('../views/Home/HotGameAGT')
            },
            {
                path: '/HotGameELS',
                component: () => import('../views/Home/HotGameELS')
            },

            {
                path: '/CDkeyChina',
                component: () => import('../views/Home/CDkeyChina')
            },
            {
                path: '/CDkeySell',
                component: () => import('../views/Home/CDkeySell')
            },
            {
                path: '/PYHelpChina',
                component: () => import('../views/Home/PYHelpChina')
            },
            {
                path: '/PYHelpAGT',
                component: () => import('../views/Home/PYHelpAGT')
            },
            {
                path: '/PYHelpELS',
                component: () => import('../views/Home/PYHelpELS')
            },
            {
                path: '/Recharge',
                component: () => import('../views/Home/Recharge')
            },
            {
                path: '/Origin',
                component: () => import('../views/Home/Origin')
            },
            {
                path: '/Box',
                component: () => import('../views/Home/Box')
            },
            {
                path: '/BuyChina',
                component: () => import('../views/Home/BuyChina')
            },
            {
                path: '/BuyRecharge',
                component: () => import('../views/Home/BuyRecharge')
            },
            {
                path: '/BuyAGT',
                component: () => import('../views/Home/BuyAGT')
            },
            {
                path: '/BuyELS',
                component: () => import('../views/Home/BuyELS')
            },
            {
                path: '/BuyMain',
                component: () => import('../views/Home/BuyMain')
            },
            {
                path: '/SellChina',
                component: () => import('../views/Home/SellChina')
            },
            {
                path: '/SellAGT',
                component: () => import('../views/Home/SellAGT')
            },
            {
                path: '/SellELS',
                component: () => import('../views/Home/SellELS')
            },
            {
                path: '/message',
                component: () => import('../views/Home/UserMessage')
            },
            {
                path: '/common',
                component: () => import('../components/Common')
            },
            {
                path: '/Chongzhi',
                component: () => import('../views/Chongzhi')
            },
            {
                path: '/BuyBalance',
                component: () => import('../views/Home/BuyBalance')
            },
        ]
    }
]
const router = new VueRouter({
    //vue中http://localhost:8080/#/index去掉#
    mode: 'history',
    routes
})

export default router
